#define _CRT_SECURE_NO_WARNINGS 
#include<stdio.h>

int get_max(int a, int b)
{
	return (a > b ? a:b);
}

void Swap(int* a, int* b)
{
	int z = *a;
	*a = *b;
	*b = z;
}

int main()
{
	int a = 0;
	int b = 0;
	scanf("%d %d",&a,&b);
	int n=get_max(a, b);
	printf("%d\n", n);
	Swap(&a, &b);
	printf("%d %d", a, b);
	return  0;
}